home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 827 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  760 b 

  1. Path: erinews.ericsson.se!usenet
  2. From: eraida@lmera.ericsson.se (Inger Dufva Z/OF)
  3. Newsgroups: comp.lang.c
  4. Subject: How to remove a substring from a string
  5. Date: 9 Jan 1996 16:32:59 GMT
  6. Organization: Ericsson Radio Systems AB
  7. Distribution: world
  8. Message-ID: <4cu5br$ejb@erinews.ericsson.se>
  9. Reply-To: eraida@lmera.ericsson.se
  10. NNTP-Posting-Host: lmerax532.lmera.ericsson.se
  11. Keywords: c, unix, string
  12.  
  13. Hi,
  14.  
  15. I would like to remove a sub string from a string in C. An example:
  16.  
  17. string: howdoyoudo
  18. sub_string: you
  19.  
  20. After this function (called remove_substring here) has been called:
  21.  
  22. new_string = remove_substring(string, sub_string);
  23.  
  24. new_string should have the value: howdodo
  25.  
  26. Can anyone please help me with this function? Thanks in advance!
  27. Cheers,
  28.  
  29. Inger
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.